<template>
	<view class="content">
		<view class="log-head">
			<view class="up">
				<view class="textt">
					当日总分润收益
				</view>
				<view class="total">
					¥{{total}}
				</view>
			</view>
			<view class="down">
				<view class="left">
					<view class="textp">
						当日自有</br>设备分润
					</view>
					<view class="money" style="display: flex;justify-content: center;">
						¥{{month}}
					</view>
				</view>
				<view class="left">
					<view class="textp">
						加权分红
					</view>
					<view class="money" style="display: flex;justify-content: center;">
						¥{{share}}
					</view>
				</view>
				<view class="right">
					<view class="textp">
						当日伙伴</br>设备分润
					</view>
					<view class="money" style="display: flex;justify-content: center;">
						¥{{max}}
					</view>
				</view>
			</view>
		</view>
		<view class="list">
			<view class="info" v-for="(item,index1) in list" :key='index1' style="display: flex;align-items: center;">
				<view style="width: 50%;">
					<view>
						{{item.equipment.name != null? item.equipment.name: '暂时无法找到'}}
					</view>
					<view class="" style="color: #999999;font-size: 26rpx;">
						{{item.userinfo_name != null? item.userinfo_name: '用户'}}
						{{item.equipment.address != null? item.equipment.address: '暂时无法找到'}}
					</view>
					
				</view>

				<view style="width: 25%;text-align: center;">
					{{item.source}}
				</view>
			
				<view class="money"  style="width: 25%;text-align: center;">
					+{{item.day_profit}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
	    data() {
	        return {
				total:0,
				max:0,
				yestoady:0,
				equ_num:0,
				list:[],
				equ_nums:0,
				content:"",
				month:'0',
				share:0
	        };
	    },
	    onLoad(option) {
			this.info(option.time)
		},
	    methods: {
			info(time){
				let userinfo = uni.getStorageSync('userinfo');
				uni.showLoading({
					title:"加载中"
				})
				this.$api.interfaceApi('getUserLogInfo')({
					id:userinfo.id,
					time:time,
					source:'1,2,4,5,20,21'
				}).then(res=>{
					if(res.code == 200){
						this.list = res.data.list
						this.total = res.data.self
						this.max = res.data.max
						this.month = res.data.month
						this.share = res.data.share_profit
						this.content  = res.data.content
						
					}
					uni.hideLoading()
				})
			}
			
		}
	};
</script>

<style lang="less" scoped>
	.content{
}
		.log-head{
				background-color: #FFFFFF;
				padding: 5rpx 0 30rpx 0;
			}
			.up{
				display: block;
				justify-content: center;
				align-items: center;
				text-align: center;
				margin: 5rpx 80rpx;
				padding:30rpx;
				border-bottom: 1rpx solid #eeeeee;
				box-sizing: border-box;
				}
				.textt{
					font-size: 36rpx;
					color: #000;
					font-weight: 550;
				}
				.total{
					color:#0066ff;
					font-weight: 550;
					font-size: 50rpx;
				}
				
			
			.down{
				display: flex;
				justify-content: space-between;
				align-items: center;
				text-align: center;
				padding:20rpx 50rpx ;
				}
				.left{
					margin: 10rpx;
					padding-right: 50rpx;
					border-right: 1rpx solid #eeeeee;
					
				}
					.textp{
						padding: 10rpx;
						font-size: 26rpx;
						color: #000;
					}
					.money{
						font-weight: 550;
						color:#0066ff;
						font-size: 34rpx;
					}
				.right{
					margin: 10rpx;
				}
				
			
		
		
		.list{
			background-color: #FFFFFF;
			//margin-top: 20rpx;
			}
			.title{
				padding: 20rpx 20rpx;
			}
			
			.info{
				display: flex;
				justify-content: space-between;
				padding: 20rpx;
				border-top:  1rpx solid #e2e2e2;
				}
				.con{
					//line-height: 90rpx;
				}
				

</style>
